<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCrontabLogsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('crontab_logs', function (Blueprint $table) {
            $table->increments('id');
            $table->string('type',10)->comment('类型');
            $table->integer('cid')->comment('任务的ID');
            $table->string('title',150)->comment('标题');
            $table->mediumText('remark')->comment('备注');
            $table->tinyInteger('status')->comment('状态 0:失败 1:成功');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('crontab_logs');
    }
}
